import request from '@/utils/request'

export default {
  //分页查所有
  getList(currentPage,pageSize,doctorVo){
    return request({
      url: `/role/search/${currentPage}/${pageSize}`,
      method: 'post',
      data:doctorVo
    })
  },
  //查询所有角色
  getAll(){
    return request({
      url: `/role`,
      method: 'get',
    })
  },
  //根据id查询
  queryById(id){
    return request({
      url: `/role/${id}`,
      method: 'get',
    })
  },
  //根据id删除
  removeById(id){
    return request({
      url: `/role/${id}`,
      method: 'delete',
    })
  },
  //增加
  add(role){
    return request({
      url: `/role`,
      method: 'post',
      data:role
    })
  },
  //编辑
  edit(role){
    return request({
      url: `/role`,
      method: 'put',
      data:role
    })
  }

}


